package com.ruoyi.index_message.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.index_message.mapper.IndexMessageInfoMapper;
import com.ruoyi.index_message.domain.IndexMessageInfo;
import com.ruoyi.index_message.service.IIndexMessageInfoService;

/**
 * 首页资讯Service业务层处理
 * 
 * @author zbz
 * @date 2024-04-22
 */
@Service
public class IndexMessageInfoServiceImpl implements IIndexMessageInfoService 
{
    @Autowired
    private IndexMessageInfoMapper indexMessageInfoMapper;

    /**
     * 查询首页资讯
     * 
     * @param id 首页资讯主键
     * @return 首页资讯
     */
    @Override
    public IndexMessageInfo selectIndexMessageInfoById(Long id)
    {
        return indexMessageInfoMapper.selectIndexMessageInfoById(id);
    }

    /**
     * 查询首页资讯列表
     * 
     * @param indexMessageInfo 首页资讯
     * @return 首页资讯
     */
    @Override
    public List<IndexMessageInfo> selectIndexMessageInfoList(IndexMessageInfo indexMessageInfo)
    {
        return indexMessageInfoMapper.selectIndexMessageInfoList(indexMessageInfo);
    }

    /**
     * 新增首页资讯
     * 
     * @param indexMessageInfo 首页资讯
     * @return 结果
     */
    @Override
    public int insertIndexMessageInfo(IndexMessageInfo indexMessageInfo)
    {
        return indexMessageInfoMapper.insertIndexMessageInfo(indexMessageInfo);
    }

    /**
     * 修改首页资讯
     * 
     * @param indexMessageInfo 首页资讯
     * @return 结果
     */
    @Override
    public int updateIndexMessageInfo(IndexMessageInfo indexMessageInfo)
    {
        return indexMessageInfoMapper.updateIndexMessageInfo(indexMessageInfo);
    }

    /**
     * 批量删除首页资讯
     * 
     * @param ids 需要删除的首页资讯主键
     * @return 结果
     */
    @Override
    public int deleteIndexMessageInfoByIds(Long[] ids)
    {
        return indexMessageInfoMapper.deleteIndexMessageInfoByIds(ids);
    }

    /**
     * 删除首页资讯信息
     * 
     * @param id 首页资讯主键
     * @return 结果
     */
    @Override
    public int deleteIndexMessageInfoById(Long id)
    {
        return indexMessageInfoMapper.deleteIndexMessageInfoById(id);
    }
}
